/**
 * This class implements the doorman's part of the
 * Barbershop thread synchronization example.
 */
public class Doorman implements Runnable{
	/**
	 * Creates a new doorman.
	 * @param gui		A reference to the GUI interface.
	 */
	private Gui gui;
	
	public Doorman(Gui gui) { 
		this.gui = gui;
		
		// Incomplete
	}

	/**
	 * Starts the doorman running as a separate thread.
	 */
	public void startThread() {
		// Incomplete
		run();
		
	}

	public void run(){
	
		while(true){
			BarbershopGui.queue.addCustomer();
			try {
				gui.println("Doorman is waiting");
				Thread.sleep(Globals.doormanSleep);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
	
	
	/**
	 * Stops the doorman thread.
	 */
	public void stopThread() {
		// Incomplete
	}

	// Add more methods as needed
}
